package org.jeecg.modules.payment.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.databind.JsonNode;
import org.jeecg.modules.payment.entity.PaymentRecord;
import org.jeecg.modules.payment.req.PaymentReq;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description: 支付记录
 * @Author: sean
 * @Date:   2024-08-28
 * @Version: V1.0
 */
public interface IPaymentRecordService extends IService<PaymentRecord> {


    IPage<PaymentRecord> selectJoinPage(Page<PaymentRecord> page, Wrapper wrapper);

    JsonNode pay(PaymentReq req);

    /**
     * 支付回调
     * @param request
     * @param response
     * @param bizType 业务类型
     * @param payChannel 支付通道
     * @param payWay 支付方式
     * @param tenantId 租户id
     */
    void payCallback(HttpServletRequest request, HttpServletResponse response, String bizType, String payChannel, String payWay, String tenantId);

}
